import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SEntityId } from "./SEntityId";
type int = number;
//class SBuyGroupBuyItem
    
    export  class SBuyGroupBuyItem extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SBuyGroupBuyItem();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.sEntiyId.__write(arg1);
            arg1.writeInt(this.itemCode);
            arg1.writeInt(this.price);
            arg1.writeInt(this.unit);
            arg1.writeInt(this.rank);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.sEntiyId = new SEntityId();
            this.sEntiyId.__read(arg1);
            this.itemCode = arg1.readInt();
            this.price = arg1.readInt();
            this.unit = arg1.readInt();
            this.rank = arg1.readInt();
            return;
        }

        public /* const */_type: int=727;

        public /* var */sEntiyId: SEntityId;

        public /* var */itemCode: int;

        public /* var */price: int;

        public /* var */unit: int;

        public /* var */rank: int;

        public static /* var */_regist: SBuyGroupBuyItem;
    }

            SBuyGroupBuyItem._regist = new SBuyGroupBuyItem(true);
        